/**
 * Created by sicongdu on 17-11-21.
 */
var model = require("./model");

var mark = (req, res) => {
    var wherestr = {
        number1: req.body.number1
    };

    var updatestr = {
        mark1: req.body.mark1,
        mark2: req.body.mark2,
        mark3: req.body.mark3,
        mark4: req.body.mark4,
    };

    model.update(wherestr, updatestr, (err, resin) => {
        if (err){
            res.send("marking failed!!!");
        }else{
            res.send("marked successfully!!!");
        }
    });
};

module.exports = mark;